<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .con {
            width: 100px;
            height: 100px;
            background-color: gold;
            position: relative;
            margin: 100px auto 0;
            border-radius: 10px;
        }

        .num {
            width: 28px;
            height: 28px;
            background-color: red;
            color: #fff;
            position: absolute;
            right: -14px;
            top: -14px;
            border-radius: 50%;
            text-align: center;
            line-height: 28px;
        }
    </style>
</head>

<body>


    <div class="con">
        <div class="num">5</div>
    </div>


</body>

</html>